package com.mbrs.service;

import com.mbrs.aggr.MySession;
import com.mbrs.aggr.MyUser;

/**
 * @author zheng chengdong
 */
public class LoginOrRegisterResult {
    private MySession finishedSession;
    private MySession newSession;
    private MyUser user;
    private boolean createNewUser;

    public LoginOrRegisterResult() {
    }

    public LoginOrRegisterResult(dml.users.proc.LoginOrRegisterResult loginOrRegisterResult) {
        finishedSession = (MySession) loginOrRegisterResult.getFinishedSession();
        newSession = (MySession) loginOrRegisterResult.getNewSession();
        user = (MyUser) loginOrRegisterResult.getUser();
        createNewUser = loginOrRegisterResult.isCreateNewUser();
    }

    public MySession getFinishedSession() {
        return finishedSession;
    }

    public void setFinishedSession(MySession finishedSession) {
        this.finishedSession = finishedSession;
    }

    public MySession getNewSession() {
        return newSession;
    }

    public void setNewSession(MySession newSession) {
        this.newSession = newSession;
    }

    public MyUser getUser() {
        return user;
    }

    public void setUser(MyUser user) {
        this.user = user;
    }

    public boolean isCreateNewUser() {
        return createNewUser;
    }

    public void setCreateNewUser(boolean createNewUser) {
        this.createNewUser = createNewUser;
    }
}
